@echo off
echo 测试入住流程工作流修复
echo ================================

echo.
echo 1. 测试启动工作流（使用ID=1的入住申请）
curl -X POST "http://localhost:8080/system/management/startWorkflow?checkInManagementId=1" ^
  -H "Authorization: Bearer YOUR_TOKEN" ^
  -H "Content-Type: application/json"

echo.
echo.
echo 2. 查询审批记录（确认没有LeaveRequest错误）
curl -X GET "http://localhost:8080/system/accraditationRecord/list" ^
  -H "Authorization: Bearer YOUR_TOKEN" ^
  -H "Content-Type: application/json"

echo.
echo.
echo 3. 查询待办任务
curl -X GET "http://localhost:8080/system/pendingTasks/list" ^
  -H "Authorization: Bearer YOUR_TOKEN" ^
  -H "Content-Type: application/json"

echo.
echo 修复测试完成！
echo 如果不再出现 "Cannot invoke LeaveRequest.setLeaveStatus" 错误，说明修复成功
pause

